use super::super::ResponseEntity;
use mall_mysql::model::brand::Brand;
///
pub fn select_by_id<'a>(id: u16) -> ResponseEntity<'a, Brand> {
    let option = Brand::select_by_id(id);
    ResponseEntity::success().data(option)
}
///
pub fn insert<'a>(s: String) -> ResponseEntity<'a, u16> {
    let brand = Brand {
        id: 0,
        name: Some(s),
    };
    let i = Brand::insert(brand);
    ResponseEntity::success().data(Some(i))
}
